package com.woniu.smallmedical.server.serverimpl;

import com.woniu.smallmedical.entity.Role;
import com.woniu.smallmedical.mapper.RoleMapper;
import com.woniu.smallmedical.server.RoleServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServerImpl implements RoleServer {
    @Autowired
    RoleMapper roleMapper;
    @Override
    public List<Role> getAllRole() {
        List<Role> allRole = roleMapper.getAllRole();
        return allRole;
    }

    @Override
    public int addRole(Role role) {
        int count = roleMapper.addRole(role);
        return count;
    }

    @Override
    public int editRoleInfo(Role role) {
        int count = roleMapper.editRoleInfo(role);
        return count;
    }

    @Override
    public int deleteRole(Role role) {
        int count = roleMapper.deleteRole(role);
        return count;
    }
}
